<?php $this->_extends('_layouts/main_layout'); ?>
<?php $this->_block('title'); ?>
	Update Pixel
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

<div id="content" class="box">
	<h1>Update Pixel</h1>
	
	<fieldset>
		<legend>Update Pixel</legend>
	<?php if (isset($errors)) 
			{
				foreach ($errors as $error)
				{
	?>
			<p class="msg error"><?php echo $error;?></p>
	<?php		}
			}
	?>
		<form method="POST" action="<?php echo url('pixelManager/tblupdate');?>">
	  		<table class="nostyle">
				<tr>
	             	<td>Campaign:</td>
	                <td>
	                    <input type="text" value="<?php echo $tblPixel['campaign']; ?>" id="campaign" name="campaign" />
	                </td>
				</tr>
	                    
	            <tr>
	              	<td>Publisher:</td>
	              	<td>
	                  	<input type="text" value="<?php echo $tblPixel['pub']; ?>" id="pub" name="pub" />
	                </td>
	         	</tr>
	          	<tr>
	            	<td>Placement:</td>
	               	<td>
	                 	<input type="text" value="<?php echo $tblPixel['pla']; ?>" id="pla" name="pla" />
	              	</td>
	         	</tr>
				<tr>
					<td>Controlled CR:</td>
	             	<td><input type="text" value="<?php echo $tblPixel['peak']; ?>" id="peak" name="peak" />%</td>
	       		</tr>
	        	<tr>
	            	<td colspan="2" class="t-right">
	               		<label id="addPixellabel" style="color:red;"></label>
	                  	<input type="submit" class="input-submit" value="Save" id="save" />
	               	</td>
	         	</tr>
	    	</table>
	    	<input type="hidden" name="id" value="<?php echo isset($tblPixel['id']) ? $tblPixel['id'] : '';?>" />
	   	</form>
	</fieldset>
</div>
<script type="text/javascript">
	$("#save").click(function(){
		var peak=$("#peak").val();
		if((!isNaN(peak)) && peak<=100 && peak!=""){
			return true;	
		}else{
			$("#addPixellabel").html('Peak Invalidate!');
			return false;
		}
	});
</script>
<?php $this->_endblock(); ?>